<template>
  <el-scrollbar class="v-scroll" :native="native" :wrap-class="wrapClass" :wrap-style="wrapStyle"
                :view-class="viewClass" :view-style="viewStyle" :noresize="noresize" :tag="tag" :style="style">
    <slot></slot>
  </el-scrollbar>
</template>
<script>
  import view from './view.js'

  export default {
    name: 'v-scroll',
    componentName: 'v-scroll',
    mixins: [view],
    provide: {},
    props: {
      desc: {
        type: String,
        default: 'v-scroll'
      },
      native: Boolean,
      wrapStyle: {},
      wrapClass: {},
      viewClass: {},
      viewStyle: {},
      noresize: Boolean, // 如果 container 尺寸不会发生变化，最好设置它可以优化性能
      tag: {
        type: String,
        default: 'div'
      }
    },
    install: function (Vue) {

      Vue.component('v-scroll', this)

    },
    computed: {
      style () {
        let prop = view.getStyle(this.$props)
        console.log(prop)
        return prop
      }

    }
  }

</script>
